var express = require('express');

var app = new express(); //实例化,也可以不new 直接 var app=express();

//配置路由
app.get('/', function(req, res) {
    res.send('首页');
});

app.get('/search', function(req, res) {
    res.send('搜索'); //?keyword=华为手机&enc=utf-8&suggest=1.his.0.0&wq
});
app.get('/login', function(req, res) {
    res.send('登录');
});
app.get('/register', function(req, res) {
    res.send('注册');
});
//监听端口
app.listen(8012, '127.0.0.1');